Layouts

Load cuxfilter and data

[1]:
from cuxfilter import charts
import cuxfilter
from bokeh import palettes
cux_df = cuxfilter.DataFrame.from_arrow('../../../data/146M_predictions_v2.arrow')

Declare charts

[2]:
#tile provider for choropleth map
chart0 = charts.choropleth(x='zip', y='delinquency_12_prediction', color_column='delinquency_12_prediction', color_aggregate_fn='mean',
                                  geo_color_palette=palettes.Purples9,
                                  geoJSONSource = 'https://raw.githubusercontent.com/rapidsai/cuxfilter/GTC-2018-mortgage-visualization/javascript/demos/GTC%20demo/public/data/zip3-ms-rhs-lessprops.json',
                                  data_points=1000, nan_color='white')
chart1 = charts.bar('dti')
chart2 = charts.bar('delinquency_12_prediction')
chart3 = charts.line('borrower_credit_score',step_size=1)
chart4 = charts.bar('seller_name',data_points=100)
chart5 = charts.line(x='loan_id',y='current_actual_upb')
chart6 = charts.line('dti')
chart7 = charts.line('delinquency_12_prediction')
chart8 = charts.bar('borrower_credit_score', data_points=100)
chart_widget = charts.multi_select('dti')

#create a list of charts
charts_list = [chart_widget, chart0, chart3, chart1, chart2, chart4, chart5, chart6, chart7, chart8]

Layout Types

1. Single feature

772fdd34db9144a58b9f6309c23df48a

[3]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.single_feature, theme=cuxfilter.themes.rapids, title="Layout - single feature")
await d.preview()
../_images/layouts_Layouts_8_2.png

2. Feature and base

10bdcc514835411bb39ef244c8016836

[4]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids, title="Layout - feature and base")
await d.preview()
../_images/layouts_Layouts_11_2.png

3. Double feature

0e5a6cf9a72c4b4d96b58b6adad543c1

[5]:
d = cux_df.dashboard([chart_widget, chart0, chart1], layout=cuxfilter.layouts.double_feature, theme=cuxfilter.themes.rapids, title="Layout - double feature")
await d.preview()
../_images/layouts_Layouts_14_2.png

4. Left feature right double

48cf06f7e6a24b6cb0c5aa9bc7451be5

[6]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.left_feature_right_double, theme=cuxfilter.themes.rapids, title="Layout - left feature right double")
await d.preview()
../_images/layouts_Layouts_17_2.png

5. Triple feature

00b02be86f71447f869f8b15ff819638

[7]:
d = cux_df.dashboard([chart_widget, chart1, chart2, chart3], layout=cuxfilter.layouts.triple_feature, theme=cuxfilter.themes.rapids, title="Layout - triple feature")
await d.preview()
../_images/layouts_Layouts_20_2.png

6. Feature and double base

c91bc23dc3ed4820bb247ba5b8308ba3

[8]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3], layout=cuxfilter.layouts.feature_and_double_base, theme=cuxfilter.themes.rapids, title="Layout - feature and double base")
await d.preview()
../_images/layouts_Layouts_23_2.png

7. Two by two

605588b01a1d43708b6bb32da98aaff6

[9]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3, chart4], layout=cuxfilter.layouts.two_by_two, theme=cuxfilter.themes.rapids, title="Layout - two by two")
await d.preview()
../_images/layouts_Layouts_26_2.png

8. Feature and triple base

4ab3cf059a584f5dadd6917ef3f9654a

[10]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_triple_base, theme=cuxfilter.themes.rapids, title="Layout - feature and triple base")
await d.preview()
../_images/layouts_Layouts_29_2.png

9. Feature and quad base

9c8825c1da4d474197488cbc47eb5a9b

[11]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_quad_base, theme=cuxfilter.themes.rapids, title="Layout - feature and quad base")
await d.preview()
../_images/layouts_Layouts_32_2.png

10. Feature and five edge

fc03f4bbb04244cd991db08a7ef7d9d9

[12]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_five_edge, theme=cuxfilter.themes.rapids, title="Layout - feature and five edge")
await d.preview()
../_images/layouts_Layouts_35_2.png

11. Two by three

7947dfd49a0b42ae847f58e938f5d447

[13]:
d = cux_df.dashboard([chart_widget, chart3, chart1, chart2, chart4, chart5, chart6], layout=cuxfilter.layouts.two_by_three, theme=cuxfilter.themes.rapids, title="Layout - two by three")
await d.preview()
../_images/layouts_Layouts_38_2.png

12. Double feature quad base

e8c5ba1a846e45bda5f3eb85ecbed11e

[14]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.double_feature_quad_base,
                     theme=cuxfilter.themes.rapids, title="Layout - double feature quad base")
await d.preview()
../_images/layouts_Layouts_41_2.png

13. Three by three

f4f245c447b941e481bf8d60225728e7

[15]:
d = cux_df.dashboard(charts_list[2:], layout=cuxfilter.layouts.three_by_three,
                     theme=cuxfilter.themes.rapids, title="Layout - three by three")
[16]:
await d.preview()
../_images/layouts_Layouts_45_0.png